﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Web.Mvc;
using System.Web.Security;


namespace Model
{
	/// <summary>
	/// Sys_RoleInfo表实体类
	/// </summary>
	[MetadataType(typeof(Sys_RoleInfoMetaData))]
	[DisplayName("Sys_RoleInfo")]
	public class Sys_RoleInfo
	{
		/// <summary>
		/// RoleID
		/// </summary>
		public string RoleID { get; set; }
		/// <summary>
		/// RoleName
		/// </summary>
		public string RoleName { get; set; }
		/// <summary>
		/// RoleType
		/// </summary>
		public string RoleType { get; set; }
		/// <summary>
		/// Description
		/// </summary>
		public string Description { get; set; }
		/// <summary>
		/// CreatedTime
		/// </summary>
		public DateTime CreatedTime { get; set; }
	}

	public class Sys_RoleInfoMetaData
	{
		//[Required]
		//[DataType(DataType.Text)]
		//[Display(Name = "RoleID")]
		//public string RoleID { get; set; }

		[Required(ErrorMessage="{0}必须输入.")]
		[StringLength(50, ErrorMessage = "角色名称最多不能超过50个字.")]
		[DataType(DataType.Text)]
		[Display(Name = "角色名称")]
		//[Remote("RoleNameIsExist", "Role")]
		public string RoleName { get; set; }

		[DataType(DataType.MultilineText)]
		[Display(Name = "角色描述")]
		public string Description { get; set; }

		//[DataType(DataType.Text)]
		//[Display(Name = "角色类型")]
		//public string RoleType { get; set; }

		//[DataType(DataType.DateTime)]
		//[Display(Name = "创建时间")]
		//public string CreatedTime { get; set; }
	}
}
